feat(lance): add Lance REST server packaging#8825
feat(lance): add Lance REST server packaging#8825jerryshao merged 7 commits intoapache:branch-lance-namepspace-devfrom
Conversation
|
Hi @beinan I created a new branch for Lance development. Can you please create a PR against that branch (https://github.com/apache/gravitino/tree/dev-lance-namespace)? |
Yes, I made the PR against the new branch now |
c753cb1 to
ea7a30d
Compare
|
Hi @beinan , The branch setting has some limitations; only the branch name started with "branch-" will run the CI, so I created a new branch (https://github.com/apache/gravitino/tree/branch-lance-namepspace-dev). Can you refresh you PR against new branch? |
43b13eb to
e91ccb9
Compare
|
@jerryshao could you help approve the CI? thanks |
|
Hey @jerryshao, could you help enable me to start the CI? |
|
We need to cherry-pick @diqiu50fix about CI to branch-lance-namepspace. |
Let me rebase that branch. |
### What changes were proposed in this pull request? can specify a principal and authorizer to do authz ### Why are the changes needed? polish authz codes for easier reuse ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? tests updated
| @Path("/{id}/list") | ||
| public Response listNamespaces( | ||
| @Encoded @PathParam("id") String namespaceId, | ||
| @DefaultValue(".") @QueryParam("delimiter") String delimiter, |
There was a problem hiding this comment.
The Lance namespace spec uses $ as the default delimiter.
Ref: https://lancedb.github.io/lance/format/namespace/concepts/#object-name
…ity cache is full. (apache#8816) ### What changes were proposed in this pull request? Adjust the caffeine weight for tags and policies to allow them to evict first compared to other entities. ### Why are the changes needed? They are less important than entities like tables, filesets. Fix: apache#8815 ### Does this PR introduce _any_ user-facing change? N/A. ### How was this patch tested? UTs --------- Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
| public static final ConfigEntry<String> CATALOG_NAME = | ||
| new ConfigBuilder(LANCE_CONFIG_PREFIX + "catalog-name") | ||
| .doc("Logical Lance catalog served by the REST endpoint") | ||
| .version(ConfigConstants.VERSION_0_1_0) |
There was a problem hiding this comment.
Will Lance rest plan to use a separate version management system, and the version starts from 0.1.0?
There was a problem hiding this comment.
I don't have strong preference, what do you think?
There was a problem hiding this comment.
iceberg rest service is using 0.2.0
public static final ConfigEntry<String> CATALOG_BACKEND =
new ConfigBuilder(IcebergConstants.CATALOG_BACKEND)
.doc("Catalog backend of Gravitino Iceberg catalog")
.version(ConfigConstants.VERSION_0_2_0)
.stringConf()
.createWithDefault("memory");
098dfaa to
763281b
Compare
mchades
left a comment
There was a problem hiding this comment.
lgtm. @jerryshao Would you like to take another review?
|
Let's merge it first for the quick iteration. |
eb8ace8
into
apache:branch-lance-namepspace-dev
### What changes were proposed in this pull request?
- add the new lance-common and lance-rest-server modules that bootstrap
a minimal Lance catalog REST facade backed by in-memory state
- introduce REST resources (LanceCatalogOperations,
LanceMetadataOperations) plus a GravitinoLanceRESTServer entry point and
auxiliary service wiring
- package assets for the Lance REST server (config + startup script) and
hook the module into Gradle distribution/standalone tarball tasks with
checksums
- extend build dependencies (SLF4J, Dropwizard metrics, Prometheus
bridge) so the service runs using existing Gravitino telemetry
components
- surface scaffolding build.gradle.kts under lance/ to disable blanket
task execution and ensure module resolution
### Why are the changes needed?
- the Lance integration needs a thin REST façade to iterate on metadata
APIs before the backend is available; this scaffolding mirrors the
Iceberg REST
flow
- distribution packaging must include the new service so it can be
assembled, tested, and deployed alongside other Gravitino auxiliaries
Fix: #N/A
### Does this PR introduce any user-facing change?
- new Lance REST server tarball and config/script templates shipped with
the distribution
- new REST endpoints under /lance/v1/... exposing catalog metadata
(namespaces, tables)
- no breaking changes to existing services
### How was this patch tested?
- ./gradlew :lance:lance-rest-server:build
- started the service locally with java -cp
lance/lance-rest-server/build/libs/* ...GravitinoLanceRESTServer
/tmp/gravitino-lance-rest-server.conf
- curl http://127.0.0.1:9101/lance/v1/catalog
- curl http://127.0.0.1:9101/lance/v1/catalog/namespaces
- curl
"http://127.0.0.1:9101/lance/v1/metadata/table?namespace=default&name=sample_table"
- curl -X POST http://127.0.0.1:9101/lance/v1/catalog/namespaces -H
'Content-Type: application/json' -d '{"namespace":"demo"}'
- curl -X DELETE http://127.0.0.1:9101/lance/v1/catalog/namespaces/demo
---------
Co-authored-by: mchades <liminghuang@datastrato.com>
Co-authored-by: Mini Yu <yuqi@datastrato.com>
Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
What changes were proposed in this pull request?
Why are the changes needed?
flow
Fix: #N/A
Does this PR introduce any user-facing change?
How was this patch tested?